<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ taglib uri="/WEB-INF/tlds/att.tld" prefix="att"%>
<html>
<head>
	<meta name="decorator" content="moduleEdit" />
<script type="text/javascript">
	function synData(action,id){
		if(confirm("确认要下发数据到SAP？"))
		{
			$("#"+id).attr("disabled","disabled");
			Oosp_Loading('正在同步，请稍等...');
			window.open(action,'_self');
		}
	}
	$(function() {
		$("#synBrand").removeAttr("disabled");
		$("#sysSupplier").removeAttr("disabled");
		$("#sysPic").removeAttr("disabled");
	});
</script>
<style type="text/css">
h4{ border-bottom:1px dotted #ccc; padding-bottom:10px; margin:30px 0 15px; color:#b12028; font-size: 12px;}
</style>
</head>
<body>
<div class="Report_f">
        <div class="Report_f_1">
             <div class="Report_f_title_1">数据同步</div>
              <div class="o-l-search-builder f_1">
    	 		  <button type="button" class="btn btn-danger btn_5 btn_right" onclick="history.go(-1)">返&nbsp;回</button>
     		</div> 
             <ul class="nav nav-tabs Report_f_title_2">
                 <li><a href="#label_1" data-toggle="tab">下发SAP</a></li>
             </ul>
             <div class="tab-content Report_f_title_3">
                  <div class="tab-pane active" id="label_1">
                         <div class="Report_f_title_4">
                         <div class="f_2">	
							 <div class="form-group col-sm-6">
								<label for="brand.brandCname" class="col-sm-9 control-label f_4">同步所有品牌到SAP:</label>
								<div class="col-sm-3 f_6">
									<button type="button" id="synBrand" class="btn btn-success btn_5" onclick="synData('${contextPath}/biz/brand/brandcate/synchroniSap','sysBrand')">同步</button>
								</div>
							</div>
							<div class="form-group col-sm-6">
								<label for="brand.brandCname" class="col-sm-9 control-label f_4">同步所有供应商到SAP:</label>
								<div class="col-sm-3 f_6">
									<button type="button" id="sysSupplier" class="btn btn-success btn_5" onclick="synData('${contextPath}/biz/brand/supplier/synchroniSap','sysSupplier')">同步</button>
								</div>
							</div>
							<div class="form-group col-sm-6">
								<label for="brand.brandCname" class="col-sm-9 control-label f_4">同步所有品牌责任人到SAP:</label>
								<div class="col-sm-3 f_6">
									<button type="button" id="sysPic" class="btn btn-success btn_5" onclick="synData('${contextPath}/biz/brand/pic/synchroniSap','sysPic')">同步</button>
								</div>
							</div>
						</div>
						
   		<h4>同步情况：</h4>
		<table class="table table-striped table-hover o-l-table table-bordered" id="table1">
			<tbody>
				<tr>
					<td>${message}</td>
				</tr>
			</tbody>
		</table>
      </div>
 </div>
 </div>
</div>
</div>
<script type="text/javascript" src="${staticPath}/js/brand.js"></script>
</body>
</html>